home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 7083 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: comma.rhein.de!serpens!not-for-mail
  2. From: mlelstv@serpens.rhein.de (Michael van Elst)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Messages vs. Semaphores for external clocking
  5. Date: 8 Apr 1996 22:11:45 +0200
  6. Organization: dis-
  7. Message-ID: <4kbru1$omt@serpens.rhein.de>
  8. References: <4ju349$r1e@sparky.navsea.navy.mil>         <4jvrqs$hk0@btmpjg.god.bel.alcatel.be> <slN3BCS00iWZ0_8G1R@andrew.cmu.edu> <316533DF.5BFD@bat710.univ-lyon1.fr>
  9. NNTP-Posting-Host: serpens.rhein.de
  10.  
  11. Laurent GIROUD <milu28@bat710.univ-lyon1.fr> writes:
  12.  
  13. >   Of course but you must not forget something -> in order to be sure
  14. >that
  15. >the semaphore you are just refering to in your program is valid  you
  16. >actually HAVE to FindName() it before and then to acces it in an atomic
  17. >operation thus needing to embrace the two instructions (FindName + 
  18. >ObtainSemaphore) in a Forbid()/Permit() pair...
  19.  
  20. No. This is necessary if the semaphore is public and if there is
  21. no better arbitration protocol for the semaphore.
  22.  
  23. For tasks that are closely connected you would use a private semaphore
  24. and a handshake protocol for creation and deletion of the semaphore.
  25.  
  26. >  This could be added to "The OS improvement list" :) ...
  27.  
  28. Semaphores should be efficient. The validation of a semaphore pointer
  29. is not efficient and a private semaphore couldn't be validated anyway.
  30.  
  31. Regards,
  32. -- 
  33.                                 Michael van Elst
  34.  
  35. Internet: mlelstv@serpens.rhein.de
  36.                                 "A potential Snark may lurk in every tree."
  37.